class CreateUsers < ActiveRecord::Migration
  def self.up
    create_table "users" do |t|
      t.column :name, :string, :limit => 100
      t.column :email, :string
      t.column :login, :string, :limit => 40, :default => "", :null => false
      t.column :hashed_password, :string, :limit => 50
      t.column :salt, :string, :limit => 50
      t.column :role_id, :integer
      t.column :created_at, :datetime
    end

    create_table "roles" do |t|
      t.column :role, :string, :limit => 80
      t.column :description, :string, :limit => 128
    end
  end

  def self.down
    drop_table "roles"
    drop_table "users"
  end
end
